package fr.inserm.um915.bdibd.model;

import java.util.Comparator;

import com.sleepycat.bind.tuple.StringBinding;
import com.sleepycat.je.DatabaseEntry;

public class IStringComparator implements Comparator<byte[]>
	{
	@Override
	public int compare(byte[] o1, byte[] o2)
			{
			StringBinding b=new StringBinding();
			String s1= b.entryToObject(new DatabaseEntry(o1));
			String s2= b.entryToObject(new DatabaseEntry(o2));
			return s1.compareToIgnoreCase(s2);
			}
	}
